*This program cleans up the disclosed output in excel to make it ready for graphing

*clean up
drop if _n<=4
rename B _2539
rename C _4049
rename D _5055
rename E _5054
rename F _5664
rename G _6570
rename H _2570
drop if _n>36

*remove stars and brackets
local stub "_2539 _4049 _5055 _5054 _5664 _6570 _2570"
foreach s of local stub{
	replace `s' = subinstr(`s',"*","",.)
	replace `s' = subinstr(`s',"(","",.)
	replace `s' = subinstr(`s',")","",.)	
}

*destring 
local stub "_2539 _4049 _5055 _5054 _5664 _6570 _2570"
foreach s of local stub{
	destring `s', force replace
}

*flag point estimates and SEs
gen vtype = 1
replace vtype = 2 if A == ""
drop A 

gen id = _n
replace id = ceil(id/2)

*reshape
reshape wide _2539 _4049 _5055 _5054 _5664 _6570 _2570, i(id) j(vtype)

gen k = id-6

*create 95%CIs
local stub "_2539 _4049 _5055 _5054 _5664 _6570 _2570"
foreach s of local stub{
	rename `s'1 b`s'
	gen lb`s' = b`s' - `s'2*1.96
	gen ub`s' = b`s' + `s'2*1.96
	rename `s'2 se_`s'
}
